import { Base } from "@/js/api/base";
import axios from "axios";


export class Combo extends Base {
    constructor(port) {
        super(port);
        // this.baseUrl = 'http://127.0.0.1:30005'
        // this.$axios = axios.create({
        //     baseURL: 'http://127.0.0.1:30005' + this.port,
        //     timeout: 30000,// 超时 毫秒
        // })
    }
    /**
     * 枚举列表
     * @param params
     * @param callBack
     */
    groupAdd(params, callBack) {
        return this.post("/combo/group/add", params, callBack)
    }
    groupDetail(params, callBack) {
        return this.get("/combo/group/detail", params, callBack)
    }
    groupList(params, callBack) {
        return this.get("/combo/group/list", params, callBack)
    }
    groupChangeStatus(params, callBack) {
        return this.post("/combo/group/change_status", params, callBack)
    }
    groupEdit(params, callBack) {
        return this.post("/combo/group/edit", params, callBack)
    }
    comboAddBatch(params, callBack) {
        return this.post("/combo/combo/add_batch", params, callBack)
    }
    comboDetail(params, callBack) {
        return this.get("/combo/combo/detail", params, callBack)
    }
    comboList(params, callBack) {
        return this.get("/combo/combo/list", params, callBack)
    }
    comboEdit(params, callBack) {
        return this.post("/combo/combo/edit", params, callBack)
    }
    groupAll(params, callBack) {
        return this.get("/combo/group/all", params, callBack)
    }
    comboEditAgent(params, callBack) {
        return this.post("/combo/combo/edit_app", params, callBack)
    }
    assignList(params, callBack) {
        return this.get("/combo/assign/list", params, callBack)
    }
    assignSet(params, callBack) {
        return this.post("/combo/assign/set", params, callBack)
    }
    comboStatus(params, callBack) {
        return this.post("/combo/combo/change_status", params, callBack)
    }
    getUse(params, callBack) {
        return this.get("/combo/dosage/get_use", params, callBack)
    }
    // 套餐剩余
    getSurplus(params, callBack) {
        return this.get("/combo/dosage/surplus_combo", params, callBack)
    }
    getDosageList(params, callBack, setting){
        return this.get("/combo/dosage/list", params, callBack, setting)
    }
    getPoolList(params, callBack, setting){
        return this.get("/combo/dosage/pool_list", params, callBack, setting)
    }
}

